import { mock } from "mockjs"

const user = function(Mock){
    function getUserInfo(){
        let userInfo = Mock.mock({
            nickname: '@cword(2,8)',
            phoneNumber: /1[3589]\d{9}/,
            avatar: '@image("80x80", @color)'
        })
        return{
            userInfo,
            code: 200,
        }
    }

    Mock.mock(/\/user\/getUserInfo/, 'post', getUserInfo)
}

export default user